<div class="rectification-detail main">
  <!-- 展示需要整改问题 -->
  <div class="issue-detail-container shadowbox">
    <div class="title">
      <div class="title-txt">
        <i class="fa fa-pencil-square-o"></i>
        <span>内容说明</span>
      </div>
    </div>
    <div class="content">
      <div class="row-dash">
        <div class="row-item">
          <span class="item-label">内容编号：</span>
          <span class="item-value red-txt">
            {{rectificationDetail.detailList.contentNumber}}
          </span>
        </div>
        <div class="row-item">
          <span class="item-label">巡查记录：</span>
          <span class="item-value">
            {{rectificationDetail.detailList.taskName}}
          </span>
        </div>
      </div>
      <div class="row-dash">
        <div class="row-item">
          <span class="item-label">巡查分类：</span>
          <span class="item-value red-txt">
            {{rectificationDetail.detailList.checkClassifyName}}
          </span>
        </div>
        <div class="row-item">
          <span class="item-label">提交时间：</span>
          <span class="item-value red-txt">
            {{rectificationDetail.detailList.problemFoundTime1}}
          </span>
        </div>
      </div>
      <div class="row-dash">
        <div class="row-item">
          <span class="item-label">巡查人：</span>
          <span class="item-value">
            {{rectificationDetail.detailList.problemFoundUser}}
          </span>
        </div>
        <div class="row-item">
          <span class="item-label">巡查单位：</span>
          <span class="item-value">
            {{rectificationDetail.detailList.responsibilityUnit}}
          </span>
        </div>
      </div>
      <div class="row-dash">
        <div class="row-item">
          <span class="item-label">巡查地点：</span>
          <span class="item-value">
            {{rectificationDetail.detailList.bidName}}
          </span>
        </div>
        <div class="row-item">
          <span class="item-label">施工队：</span>
          <span class="item-value">
            {{rectificationDetail.detailList.teamName}}
          </span>
        </div>
      </div>
      <div class="row-dash"
        ng-hide="rectificationDetail.detailList.problemStatus == 3">
        <div class="row-item">
          <span class="multiple-rows-label">整改期限：</span>
          <span class="multiple-rows-value">
            {{rectificationDetail.detailList.problemDeadline1}}
          </span>
        </div>
      </div>
      <div class="row-dash"
        ng-hide="rectificationDetail.detailList.problemStatus == 3">
        <div class="row-item" style="width: 100%;">
          <span class="item-label">内容场景：</span>
          <span class="item-value">
            {{rectificationDetail.detailList.problemScenarios}}
          </span>
        </div>
      </div>
      <div class="row-dash">
        <div class="row-item">
          <span class="item-label">描述：</span>
          <span class="item-value">
            {{rectificationDetail.detailList.problemDescription}}
          </span>
        </div>
      </div>
      <div class="issue-pics">
        <div class="issue-pics-title">照片</div>
        <div class="issue-pics-container">
          <img
            ng-repeat="item in rectificationDetail.detailList.fileBeanList" 
            ng-src="{{serverIp}}/{{item.filePath}}"
            ng-click="rectificationDetail.preview(item)">
        </div>
      </div>
    </div>
  </div>

  <!-- 展示整改完成情况 -->
  <div class="issue-detail-container shadowbox" 
    ng-hide="rectificationDetail.detailList.problemStatus == 0 || rectificationDetail.detailList.problemStatus == 3">
    <div class="title">
      <div class="title-txt">
        <i class="fa fa-wrench"></i>
        <span>整改情况</span>
      </div>
    </div>
    <div class="content">
      <div class="row-dash">
        <div class="row-item">
          <span class="item-label">整改提交人：</span>
          <span class="item-value">
            {{rectificationDetail.detailList.problemModifyBean.problemModifyUserName}}
          </span>
        </div>
        <div class="row-item">
          <span class="item-label">提交时间：</span>
          <span class="item-value">
            {{rectificationDetail.detailList.problemModifyBean.modifyTime1}}
          </span>
        </div>
      </div>
      <div class="row-dash">
          <span class="item-label fl">原因分析：</span>
          <span class="item-value" style="display: block;margin-left:60px;">
            {{rectificationDetail.detailList.problemModifyBean.causeAnalysis}}
          </span>
      </div>
      <div class="row-dash">
        <span class="multiple-rows-label">整改说明：</span>
        <span class="multiple-rows-value" style="color: #858585;">
          {{rectificationDetail.detailList.problemModifyBean.modifyDescription}}
        </span>
      </div>      
      <div class="issue-pics">
        <div class="issue-pics-title">照片</div>
        <div class="issue-pics-container">
          <img
            ng-repeat="item in rectificationDetail.detailList.problemModifyBean.fileBeanList"
            ng-src="{{serverIp}}/{{item.filePath}}"
            ng-click="rectificationDetail.preview(item)"/>
        </div>
      </div>     
    </div>
  </div>
  
  <!-- 提交整改后照片 新增 -->
  <div class="item-container shadowbox"
    ng-show="rectificationDetail.detailList.problemStatus == 0">
    <div class="title">
      <div class="title-txt">
        <i class="fa fa-wrench"></i>
        <span>上传整改后照片</span>
      </div>
    </div>
    <div class="content">
      <div class="single-row">
        <div class="row-item w30">
          <span class="label">责任单位：</span>
          <span class="row-value">{{rectificationDetail.detailList.responsibilityUnit}}</span>
        </div>          
      </div>
      <div class="single-row">
        <div class="row-item">
          <span class="label">整改时间：</span>
          <input type="text" style="width: 0;height: 0;opacity: 0;">
          <input type="text" ng-datepicker
            style="margin-left: -20px;" 
            ng-model="rectificationDetail.rectificationList.modifyTime" />
        </div>
      </div>
      <div class="single-row">
        <div class="row-item">
          <span class="label">原因分析：</span>
          <span>以下方面存在不足</span>
          <div class="reasons">
            <button class="sel-btn-primary"
              ng-class="{'active': reason.active ? true : false}"
              ng-click="reason.active = !reason.active"
              ng-repeat="reason in rectificationDetail.reasons">{{reason.name}}</button>
          </div>          
        </div>
      </div>
      <div class="single-row">
        <div class="row-item">
          <span class="label v-middle">整改说明：</span>
          <div class="right-item-outer">
            <textarea class="v-middle" cols="30" rows="10"
              placeholder="请输入整改情况" 
              ng-model="rectificationDetail.rectificationList.modifyDescription"></textarea>
          </div>
        </div>
      </div>
      <div class="single-row">
        <div class="row-item">
          <div class="right-item-outer pic-upload-container" >
            <common-attachment-upload
              component-id="cp2"
              file-type="image"
              pick-btn-id="avatar_attachment_picker1"
              upload-url="{{fileUploadUrl.problemModifyBean}}"
              file-list="rectificationDetail.detailList.problemModifyBean.fileBeanList"
              is-uploading="rectificationDetail.isUploading">
            </common-attachment-upload>
          </div> 
        </div>
      </div>
      <div class="single-row">
        <div class="right-outer"
          authorization-btn="api/securityActivities/problemModify/addProblemModify" 
          ng-click="rectificationDetail.submit()">
          <a class="pa-btn pure-btn">提交</a>
        </div>
      </div>
    </div>
  </div>

  <!-- 审批 -->
  <div class="item-container shadowbox"
    ng-if="rectificationDetail.isAuditable()">
    <div class="title">
      <div class="title-txt">
        <i class="fa fa-calendar"></i>
        <span style="margin-left: 2px">审批</span>
      </div>
    </div>
    <div class="content">
      <div class="single-row">
        <div class="right-outer approval-through">
          <input type="radio" class="sex-checkbox" value="1" 
            ng-model="rectificationDetail.approval.checkResult" /><span>通过</span>
          <input type="radio" class="sex-checkbox" value="0" 
            ng-model="rectificationDetail.approval.checkResult" /><span>不通过</span>
        </div>
      </div>
      <div class="single-row">
        <div class="right-outer">
          <textarea name="" id="" cols="30" rows="10" 
            placeholder="请输入整改意见"
            ng-model="rectificationDetail.approval.comments"></textarea>
        </div>
      </div>
    </div>
    <!-- 提交按钮 -->
    <div class="btn-outer" style="padding-left: 34%; text-align: left;"
      ng-show="rectificationDetail.detailList.problemStatus == 1">
      <a class="pa-btn"
        authorization-btn="api/securityActivities/problemModify/auditModifyProblem"
        ng-click="rectificationDetail.approvalSubmit()">
        <i class="fa fa-save"></i>
        <span class="ml5">提交</span>
      </a>
      <a class="pa-btn reset-btn" ng-click="rectificationDetail.reset()">
        <i class="fa fa-repeat"></i>
        <span class="ml5">重置</span>
      </a>
    </div>
  </div>

  <!-- 展示审批状态 -->
  <div class="item-container issue-detail-container shadowbox"
    ng-show="(rectificationDetail.approval.checkResult == '0' && rectificationDetail.detailList.problemStatus == '0') || rectificationDetail.detailList.problemStatus == '2'">
    <div class="title">
      <div class="title-txt">
        <i class="fa fa-calendar"></i>
        <span style="margin-left: 2px">审批</span>
      </div>
    </div>
    <div class="content">
      <div class="row-dash">
        <div class="row-item">
          <label class="item-label">审批人：</label>
          <span class="item-value">{{rectificationDetail.approval.auditUserName}}</span>
        </div>
        <div class="row-item">
          <label class="item-label">审批时间：</label>
          <span class="item-value">{{rectificationDetail.approval.updateTime1}}</span>
        </div>      
      </div>
      <div class="row-dash">
        <div class="row-item">
          <label class="item-label">审批结果：</label>
          <span class="item-value">
            {{rectificationDetail.approval.checkResult == '0' ? '未通过' : 
            rectificationDetail.approval.checkResult == '1' ? '通过' : ''}}</span>
        </div>
        <div class="row-item">
          <label class="item-label">审批意见：</label>
          <span class="item-value">{{rectificationDetail.approval.comments}}</span>
        </div>      
      </div>
    </div>
  </div>
</div>